package edu.mobbuzz.daf.dao.ibatis;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import edu.mobbuzz.daf.dao.IStreamDao;

public class StreamDaoImpl extends BaseDaoImpl implements IStreamDao {

	@Override
	protected String getNamespace() {
		return "Stream";
	}
	
	public List getCountDailyChart(Date twawal, Date twakhir) {
		Map map = new HashMap();
		map.put("twawal", twawal);
		map.put("twakhir", twakhir);		
		List chartList = getSqlMapClientTemplate().queryForList(getNamespace()+".countDailyChart", map);
		return chartList;
	}
	
	public List getCountMonthlyChart(Date twawal, Date twakhir) {
		Map map = new HashMap();
		map.put("twawal", twawal);
		map.put("twakhir", twakhir);		
		List chartList = getSqlMapClientTemplate().queryForList(getNamespace()+".countMonthlyChart", map);
		return chartList;
	}
	
	public List getCountYearlyChart(Date twawal, Date twakhir) {
		Map map = new HashMap();
		map.put("twawal", twawal);
		map.put("twakhir", twakhir);		
		List chartList = getSqlMapClientTemplate().queryForList(getNamespace()+".countYearlyChart", map);
		return chartList;
	}
}
